#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QGraphicsScene>
#include <QGraphicsView>
#include <QGraphicsRectItem>
#include <QMouseEvent>
#include <QList>

#include "graphicsview.h"
#include "graphicsscene.h"
#include "myitem.h"

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

private:
    Ui::MainWindow *ui;

    GraphicsView *myView;
    GraphicsScene *myScene;
    QGraphicsRectItem *canvas;
    QGraphicsRectItem *rubber;

    QList<myItem *> itemList;



private slots:
    void setSize(int length, int width);
    void on_actionSetSize_triggered();

    void recvStartPoint(int x1, int y1);
    void recvEndPoint(int x2, int y2);
    void initSelectRubber();

};


#endif // MAINWINDOW_H
